<?php


namespace App\Services;


class CommonService
{
    public static function bytes2String($bytes){
        $hex='';
        foreach($bytes as $byte){
            $one=dechex($byte);
            if(strlen($one)=='1'){
                $one='0'.$one;
            }
            $hex.=$one;
        }
        $string=hex2bin($hex);
        return $string;
    }

}